Functional low-level interpreters

نویسنده

  • Jerzy Karczmarczuk
چکیده

We show how to construct in a pure, lazy functional language Haskell a low-level, FORTH-like (stack based, postfix style) virtual machine, used as a target platform in our compilation course for computer science students. The implementation is clear, reasonably efficient, and easily extensible. Two models are presented: more “classical”, with a separate return stack, and an interpreter based on the continuation-passing style. The idea, although traditional, was a bit experimental, since this was the first contact of our students with Haskell and with advanced functional techniques. We exploited thus this course to teach also those techniques, on a comprehensive and conceptually coherent set of examples.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Specialising Interpreters Using Offline Partial Deduction

We present the latest version of the logen partial evaluation system for logic programs. In particular we present new binding-types, and show how they can be used to effectively specialise a wide variety of interpreters. We show how to achieve Jones-optimality in a systematic way for several interpreters. Finally, we present and specialise a nontrivial interpreter for a small functional program...

متن کامل

Specializing Interpreters using Offline Partial Deduction

We present the latest version of the logen partial evaluation system for logic programs. In particular we present new binding-types, and show how they can be used to effectively specialise a wide variety of interpreters. We show how to achieve Jones-optimality in a systematic way for several interpreters. Finally, we present and specialise a nontrivial interpreter for a small functional program...

متن کامل

Jitk: A Trustworthy In-Kernel Interpreter Infrastructure

Modern operating systems run multiple interpreters in the kernel, which enable user-space applications to add new functionality or specialize system policies. The correctness of such interpreters is critical to the overall system security: bugs in interpreters could allow adversaries to compromise user-space applications and even the kernel. Jitk is a new infrastructure for building in-kernel i...

متن کامل

Dynamic Optimization of Interpreters using DynamoRIO

Interpreters are widely used in domain-specific, dynamic, and scripting languages. While their implementation is relatively simple, their performance is poor. In this thesis we improve the performance of interpreters using dynamic optimization techniques. This task is challenging because the information regarding the interpreted program is not known until the interpreter is run. Efficient imple...

متن کامل

Petri Nets as Semantic Domain for Diagram Notations

This paper summarizes the work carried out by the authors during the last years. It proposes an approach for defining extensible and flexible formal interpreters for diagram notations based on high-level timed Petri nets. The approach defines interpreters by means of two sets of rules. The first set specifies the correspondences between the elements of the diagram notation and those of the sema...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2002